package admin

import (
	"context"
	"server/internal/service"

	"server/api/admin/system"
)

func (c *ControllerSystem) FileDelete(ctx context.Context, req *system.FileDeleteReq) (res *system.FileDeleteRes, err error) {
	res = new(system.FileDeleteRes)
	err = service.File().FileDelete(ctx, req.Path)
	if err != nil {
		res.Result = 0
	} else {
		res.Result = 1
	}
	return
}
